package com.vhly.classfile;

import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;

public interface Attribute {

    public static final int TYPE_UNKNOWN = 0;
    public static final int TYPE_SOURCEFILE = 1;
    public static final int TYPE_CONSTANTVALUE = 2;
    public static final int TYPE_CODE = 3;
    public static final int TYPE_LINENUMBER = 4;
    public static final int TYPE_LOCALVARIABLE = 5;
    public static final int TYPE_INNERCLASSES = 6;
    public static final int TYPE_DEPRECATED = 7;
    public static final int TYPE_EXCEPTIONS = 8;
    public static final int TYPE_SYNTHETIC = 9;
    public static final int TYPE_EXCEPTIONTABLE = 10;

    public abstract void read(DataInputStream datainputstream, boolean flag)
            throws IOException;

    public abstract void write(DataOutputStream dataoutputstream)
            throws IOException;

    public abstract int getType();

    public abstract int getNameIndex();

    public abstract void setNameIndex(int i);

    public abstract int getDataLen();

    public abstract void setDataLen(int i);
}